<template>
  <rx-dialog @handOk="handleSubmit" @cancel="cancel">
      <div style="position: relative;top: 12%;right: 8%;">
      <div slot="center">
          <a-form :form="form">
              <a-form-item style="display:none">
                  <a-input v-decorator="['classificationId']"/>
              </a-form-item>
              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.classificationName','分类名称')">
                  <a-input :placeholder="i18n('form.classificationName','分类名称')" v-decorator="['classificationName', {rules: [{required: true, message: i18n('form.classificationName','分类名称','input')}]}]"/>
              </a-form-item>
              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.description','描述')">
                  <a-textarea :placeholder="i18n('form.description','描述')" v-decorator="['description', {rules: [{required: false, message: i18n('form.description','描述','input')}]}]" :rows="4" />
              </a-form-item>
          </a-form>
      </div>
      </div>
  </rx-dialog>
</template>
<script>
  import SysInterfaceClassificationApi from '@/api/system/core/sysInterfaceClassification'
  import {BaseForm,RxDialog} from "@lowcode/jpaas-common-lib";
  export default {
    name: 'SysInterfaceClassificationEdit',
    mixins:[BaseForm],
    props:["projectId"],
    components: {
      RxDialog,
    },
    methods: {
        i18n(name, text, key) {
            return this.$ti18(name, text, "sysInterfaceProject", key);
        },
      get(id){
        return SysInterfaceClassificationApi.get(id);
      },
      save(values){
        values.projectId=this.projectId;
        return SysInterfaceClassificationApi.save(values);
      }

    }
  }
</script>
